Purpose | Represents a RelationView. |
---|---|
Hierarchy | java.lang.Object
|
Syntax | public class RelationView
|
Description | RelationView implements interface symantec.itools.db.pro.DataAccess. RelationView handles all data manipulation with a dbANYWHERE Server. It lets you bind an object to a projection.
A RelationView is a reference to Record object in MultiView's view. You can have multiple independent RelationView for one view that is in a MultiView. |
See also | AutoDetail
DataAccess MultiView |
Purpose | Creates a RelationView object. |
---|---|
Syntax | public RelationView(Request request) throws SQLException
|
Parameters | request = Request object.
detail = AutoDetail object. |
Description | Creates a RelationView object. |
Purpose | Returns a String from a java.io.InputStream object that is in ASCII format. |
---|---|
Syntax | public static String asciiStreamtoString(InputStream is) throws IOException
|
Parameters | is = Input stream in ASCII format. |
Description | Returns a String from a java.io.InputStream object that is in ASCII format. |
See also | java.io.InputStream (in the Java API Documentation) |
Purpose | Returns a String from an array of bytes. |
---|---|
Syntax | public static String binaryArraytoString(byte b[ ]) throws IOException
|
Parameters | b = Array of bytes. |
Description | Returns a String from an array of bytes. Zero values are translated to the string "/0". This method should be used for debugging purposes. Returns a String containing the ASCII representation of the data that is stored in the input byte array. The String is limited to 255 characters for performance reasons. |
Purpose | Returns a String from a java.io.InputStream object that is in binary format. |
---|---|
Syntax | public static String binaryStreamtoString(InputStream is,
|
Parameters | is = Input stream in binary format.
length = |
Description | Returns a String from a java.io.InputStream object that is in binary format. Zero values are translated to the string "/0". This function is should be used for debugging purposes. Returns a String containing the ASCII representation of the data that is stored in the provided java.io.InputStream. This string is limited to 255 characters, for performance reasons. |
See also | java.io.InputStream (in the Java API Documentation) |
Purpose | Binds a RecordLink object to a RelationView's current record. |
---|---|
Syntax | public void bindCurrentRecord(RecordLink obj) throws SQLException
|
Parameters | obj = An object supporting the RecordLink interface. |
Description | Binds a RecordLink object to a RelationView's current record. Visual CafÄ Pro will notify the RecordLink object each time the current record's data changes. |
See also | RecordLink
Record |
Purpose | Binds a list object to a RelationView's projection. |
---|---|
Syntax | public ListBinder bindList(ConnectionInfo conn,
|
Parameters | conn = ConnectionInfo object.
sql = The SQL statement to use when generating the list. listObj = An object supporting the ListLink interface that wants to be bound to a list of columns. columns = Columns to bind to the listObj. |
Description | Binds a Java object to a RelationView's projection. The Java object must support the ListLink interface. This method is only used for objects that support lists.
Returns a ListBinder object. |
See also | ListLink |
Purpose | Binds a Java object to a RelationView's projection. |
---|---|
Syntax | public ProjBinder bindProj(int proj,
|
Parameters | proj = Ordinal number associated with the projection going from left to right in a view.
obj = A Java object that supports the ProjLink interface. |
Description | Binds a Java object to a RelationView's projection. The Java object must support the ProjLink interface.
Returns a ProjBinder object that can be used to set and get data for the projection. |
See also | ProjLink |
Purpose | Closes a MultiView. |
---|---|
Syntax | public void closeMultiView( ) throws SQLException
|
Parameters | None. |
Description | Closes a MultiView. |
Purpose | Marks a record for deletion. |
---|---|
Syntax | public void deleteRecord( ) throws SQLException
|
Parameters | None. |
Description | Marks the RelationView's current record for deletion and notifies the bound ProjLink and ListLink object of the change. The record will be deleted when the MultiView is saved. |
Purpose | Indicates whether or not a specific projection exists. |
---|---|
Syntax | public boolean doesProjExist(String name) throws SQLException
|
Parameters | name = Project name. |
Description | Indicates whether or not a specific projection exists. |
Purpose | Turns on or off the notification of ProjLink, ListLink, and RecordLink objects. |
---|---|
Syntax | public void enableBindingNotify(boolean enable) throws SQLException
|
Parameters | enable = Indicates whether to enable (True) or disable (False) bound object notifications. When notification is enabled, the caller needs to invoke a notification when one is required.
applyToDetails = Indicates whether or not to apply the enable setting to all detail views that are based on the RelationView. |
Description | Turns on or off the notification of ProjLink, ListLink, and RecordLink objects when a RelationView's data changes. |
Purpose | Turns on or off the generation of SQL statements for the RelationView's detail views. |
---|---|
Syntax | public void enableDetailSQL(boolean enable) throws SQLException
|
Parameters | enable = Indicates whether to enable (True) or disable (False) the generation of SQL statements. |
Description | Turns on or off the generation of SQL statements for the RelationView's detail views. |
Purpose | Returns a projection's ID. |
---|---|
Syntax | public int findProjByName(String name) throws SQLException
|
Parameters | name = Name of a projection. |
Description | Returns a projection's ID. The ID is the ordinal position of the projection relative to the left "side" of the RelationView. |
Purpose | Sets a RelationView's current record to the view's first record. |
---|---|
Syntax | public boolean first( ) throws SQLException
|
Parameters | None. |
Description | Sets a RelationView's current record to the view's first record and notifies all bound ProjLink and ListLink object of the change.
Returns True if a Record object associated with the first Record in the RelationView was found. False, otherwise. |
See also | ListLink
ProjLink Record |
Purpose | Returns an AutoDetail object. |
---|---|
Syntax | public AutoDetail getAutoDetail( ) throws SQLException
|
Parameters | sql = SQL statement.
conn = ConnectionInfo object. requestProps = java.util.Properties object that contains Request properties. detailProps = java.util.Properties object that contains AutoDetail properties. |
Description | Returns an AutoDetail object which can be used to add a detail RelationView to this RelationView. |
Purpose | Returns the record number for a RelationView's current record as an int. |
---|---|
Syntax | public int getCurrentRecordNumber( )
|
Parameters | None. |
Description | Returns the record number for the RelationView's current record. |
Purpose | Returns the record number for a RelationView's current record as a String. |
---|---|
Syntax | public String getCurrentRecordNumberString( )
|
Parameters | None. |
Description | Returns the record number for the RelationView's current record. |
Purpose | Returns the state of a RelationView's current record. |
---|---|
Syntax | public byte getCurrentRecordState( )
|
Parameters | None. |
Description | Returns the state of the current record. Possible values: |
See also | Record |
Purpose | Returns a MultiView. |
---|---|
Syntax | public MultiView getMultiView( ) throws SQLException
|
Parameters | None. |
Description | Returns a MultiView. |
Purpose | Returns a RelationView's name. |
---|---|
Syntax | public String getName( ) throws SQLException
|
Parameters | None. |
Description | Returns a RelationView's name. |
Purpose | Creates a new record. |
---|---|
Syntax | public boolean getNewRecord( ) throws SQLException
|
Parameters | None. |
Description | Returns the next new record in the view's Record buffers, sets the RelationView's current record to the new record, and notifies all bound ProjLink and ListLink object of the change.
Returns: True indicates that a new Record was positioned in the underlying view that the RelationView represents. False otherwise. |
See also | ListLink
ProjLink Record |
Purpose | Returns a record. |
---|---|
Syntax | public Record getRecord( ) throws SQLException
|
Parameters | None. |
Description | Returns a record. |
Purpose | Sets a RelationView's current record to the record with the specified record number. |
---|---|
Syntax | public boolean goTo(int RecordNum) throws SQLException
|
Parameters | RecordNum = An integer or String representing the ordinal number of the desired Record in the RelationView. If RecordNum is a String, it is assumed to be convertable to an integer. |
Description | Goes to a specific Record number in the view buffer referenced by the RelationView object and notifies all bound ProjLink and ListLink object of the change. This method facilitates random access of Records in a RelationView.
Returns: True indicates that a Record corresponding to the given record number was found. False otherwise. |
See also | ListLink
ProjLink Record |
Purpose | Indicates whether or not binding notifications are enabled. |
---|---|
Syntax | public boolean isBindingNotifyEnabled( ) throws SQLException
|
Parameters | None. |
Description | Indicates whether ListLink, ProjLink, and RecordLink binding notifications are enabled (True) or disabled (False). |
Purpose | Indicates whether or not a record can be read. |
---|---|
Syntax | public boolean isCurrentRecordReadable( ) throws SQLException
|
Parameters | None. |
Description | Indicates whether or not a record can be read. |
Purpose | Indicates whether or not a record can be written to. |
---|---|
Syntax | public boolean isCurrentRecordWritable( ) throws SQLException
|
Parameters | None. |
Description | Indicates whether or not a record can be written to. |
Purpose | Sets a RelationView's current record to the next record. |
---|---|
Syntax | public boolean next( ) throws SQLException
|
Parameters | None. |
Description | Moves the database cursor to the next Record in the view buffer and notifies all bound ProjLink and ListLink objects of the change.
Returns: True indicates that the next record was found. False indicates there were no more records. |
See also | ListLink
ProjLink Record |
Purpose | Sets a RelationView's current record to the previous record. |
---|---|
Syntax | public boolean prev( ) throws SQLException
|
Parameters | None. |
Description | Moves the database cursor to the previous Record in the view buffer and notifies all bound ProjLink and ListLink objects of the change.
Returns: True indicates that the previous record was found. False indicates there is no previous record. |
See also | ListLink
ProjLink Record |
Purpose | Processes an empty or NULL String. |
---|---|
Syntax | public static String processEmptyStringData(String data,
|
Parameters | data = String to process.
rv = RelationView object. proj = Projection ID for a column in a view traversing from left to right. columnType = Column's data type. treatBlankAsNull = Indicates whether or not to treat a blank as a NULL. |
Description | Processes an empty or NULL String. Returns the appropriate value to send to a database based on the columnType and treatBlankAsNull parameters. |
Purpose | Restarts a MultiView. |
---|---|
Syntax | public void restartMultiView( ) throws SQLException
|
Parameters | None. |
Description | A convenience function which calls the restart method on the containing MultiView. Called automatically after a successful saveMultiView. May also be used directly to pick up any database changes made by other applications. |
See also | restart
saveMultiView |
Purpose | Rewinds a RelationView. |
---|---|
Syntax | public void rewind( ) throws SQLException
|
Parameters | None. |
Description | Resets a RelationView to its initial record state and notifies all bound ProjLink and ListLink objects of the change. |
See also | ListLink
ProjLink Record |
Purpose | Saves a MultiView's changes. |
---|---|
Syntax | public void saveMultiView( ) throws SQLException
|
Parameters | None. |
Description | Saves all changes made to the containing MultiView object. This method saves all changes made by RelationView objects that refer to views in the scope of the containing MultiView object. |
See also | save
restartMultiview |
Purpose | Sets a RelationView's name. |
---|---|
Syntax | public void setName(String newName) throws SQLException
|
Parameters | newName = New name. |
Description | Sets the name associated with the RelationView in the MultiView object. |
Purpose | Returns the int or String equivalent of a String or int data type name. |
---|---|
Syntax | public static int sqlTypeConvert(String typename)
|
Parameters | typename = Data type name in a String.
typeid = Data type name in the form of a numerical value. |
Description | Returns the int or String equivalent of the input String or int data type name. |
Purpose | Unbinds an object. |
---|---|
Syntax | public void unBindObj(Object obj) throws SQLException
|
Parameters | obj = Object to unbind. |
Description | Unbinds an object. |
Purpose | Unbinds a projection. |
---|---|
Syntax | public void unBindProj(int proj) throws SQLException
|
Parameters | proj = Projection to unbind. |
Description | Unbinds a projection. |
Purpose | Undoes a record's data changes. |
---|---|
Syntax | public void undoRecord( ) throws SQLException
|
Parameters | None. |
Description | Changes the current record to its original data values by doing the following:
|
See also | ListLink
ProjLink |
Copyright © 1996 Symantec Corporation. All rights reserved.